package com.maochang.top.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@Configuration
//扫包操作
@ComponentScan(basePackages = {"com.maochang"})
//@EnableAspectJAutoProxy(proxyTargetClass = true) //开启Aspect生成代理对象
@EnableAspectJAutoProxy
public class ConfigAop {

}
/**
 * 一、包扫描
 * 1.注解xml
 *   @Configuration
 *   @ComponentScan(basePackages = {"com.maochang"})
 *   @EnableAspectJAutoProxy(proxyTargetClass = true) 开启Aspect生成代理对象
 * 2.xml版本
 *   beans.xml xml配置文件
 *   <context:property-placeholder location="jdbc.properties"/>
 *   <aop:aspectj-autoproxy></aop:aspectj-autoproxy> 开启Aspect生成代理对象
 */